﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<!--这meta的作用就是删除默认的苹果工具栏和菜单栏。-->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<!--在web app应用下状态条（屏幕顶部条）的颜色-->
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<!--该标签用于指定是否将网页内容中的手机号码显示为拨号的超链接。-->
<meta name="format-detection" content="telephone=no"/>
<!--网页在任何时候都不能被Cache存储-->
<meta http-equiv="Expires" content="-1"/>
<!--清除缓存-->
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Pragma" content="no-cache"/>
<title></title>
<link href="${ctx}/static/newweb/css/question.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/static/newweb/css/top.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/static/newweb/css/footer.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/newweb/css/mdialog.css"/>
<script src="${ctx}/static/newweb/js/zepto.min.js"></script>
<script src="${ctx}/static/newweb/js/mdialog.js"></script>
<script language="javascript" type="text/javascript">
function home(mid){
	window.location="${ctx}/wechatapi/personal?mid="+mid;
}
</script>
</head>

<body>
<div class="top">提问
</div>
<%
  if (session.member.headimgurl == null){
%>
<img class="topone" src="${ctx}/static/newweb/img/wechat.png"  onclick="home('${session.member.id}')"/>
<%
  }else{
%>
<img class="topone" src="${session.member.headimgurl!}46"  onclick="home('${session.member.id}')"/>
<%
  }
%>
<input type="button" value="提交" class="tj" onclick="dosubmit()"/>
<div class="topbox"></div>
<ul class="nav">
<li class="current">管理</li>
<li>财务</li>
<li>行政</li>
<li>业务</li>
</ul>
<form id="askForm" action="${ctx}/wechatapi/doEditAsk" method="post">
<input type="hidden" name="faqs.id" value="${faq.id!}"/>
<input type="hidden" name="faqs.mid" value="${faq.mid!}"/>
<input type="hidden" name="faqs.typeid" id="typeid" value="${faq.typeid!}"/>
<textarea rows="4" cols="20" class="text" placeholder="问题：" name="faqs.title" id="title">${faq.title!}</textarea>
<textarea rows="8" cols="20" class="text" placeholder="添加问题的补充说明：" name="faqs.content" id="content">${faq.content!}</textarea>
</form>
<div class="bottom"></div>
<div class="footer">
    <a href="${ctx}/wechatapi/portal" class="footerl"><img src="${ctx}/static/newweb/img/zhuye.png" /></a>
    <a href="${ctx}/wechatapi/search" class="footerr"><img src="${ctx}/static/newweb/img/sousuo.png" /></a>
</div>
<div class="fix">
<a href="${ctx}/wechatapi/ask">问</a>

</div>

<script  language="javascript" type="text/jscript">
$(document).ready(function(){
	$("li").removeClass("current");
	$('li').eq('${faq.typeid-1}').addClass("current");
	$("li").click(function(){
		$("li").removeClass("current");
		$(this).addClass("current");
		var itemIndex = $(this).index();
		if (itemIndex == '0'){
			$('#typeid').val('1');
		}else if (itemIndex == '1'){
			$('#typeid').val('2');
		}else if (itemIndex == '2'){
			$('#typeid').val('3');
		}else if (itemIndex == '3'){
			$('#typeid').val('4');
		}
	})
});
function dosubmit(){
	if ($('#title').val() ==null || $('#title').val()==""){
		new TipBox({
			type:'error',
			str:'请输入主题!',
			hasBtn:true
		});
		return false;
	}
	new TipBox({
		type:'success',
		str:'操作成功',
		hasBtn:false,
		setTime:1000,
		callBack:function(){
			$('#askForm').submit();
		}
	});
}
</script>
</body>
</html>
